//
//  ViewController.m
//  设备ID 渠道 版本
//
//  Created by . on 2018/8/7.
//  Copyright © 2018年 🍃🌺🌺🍃. All rights reserved.
//

#import "ViewController.h"
#import <AFNetworking.h>
#import "EdHttp.h"
//http://yuehui.tw.zongletech.com:8089/pub-api/v1/user/send-code?countryCode=%2B86&phoneNumber=17600031295

@interface ViewController ()
{
    UITextField * field;
    NSString * number;
    NSString * coded;
    NSString * chaian;
}

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    UDID
//    NSString *uuid = [[NSUUID UUID] UUIDString];
//    NSLog(@"%@",uuid);
////    版本号
//    NSString *appCurVersion = [[[NSBundle mainBundle] infoDictionary]objectForKey:@"CFBundleShortVersionString"];
//    NSLog(@"%@",appCurVersion);
//
////    渠道号
//    NSString * str = @"1001";
//    NSLog(@"%@",str);

    //    haoma
    chaian = @"+86";
    NSLog(@"%@",chaian);
    
    NSString * number = @"17600031295";
    NSLog(@"%@",number);
    
    field =[[UITextField alloc]initWithFrame:CGRectMake(100, 100, 200, 40)];
    field.borderStyle = UITextBorderStyleRoundedRect;
    field.text = @"";
    [self.view addSubview:field];
    
    UIButton * btn =[[UIButton alloc]initWithFrame:CGRectMake(100, 200, 100, 40)];
    [btn setBackgroundColor:[UIColor redColor]];
    [btn addTarget:self action:@selector(btnn:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
//    yuehui.tw.zongletech.com:8089/pub-api/v1/user/send-code?
}
//接口地址
//http://yuehui.tw.zongletech.com:8089/pub-api/v1/user/send-code?countryCode=%2B86&phoneNumber=17600031295
-(void)btnn:(UIButton * )sender
{
    NSDictionary * pustdic = @{@"countryCode":chaian,@"phoneNumber":@"17600031295"};

    [EdHttp post:@"http://yuehui.tw.zongletech.com:8089/pub-api/v1/user/send-code" params:pustdic progress:^(id uploadProgress)
    {
        NSLog(@"11111");
    }
         success:^(id responseObject)
    {
        NSLog(@"==========%@",responseObject);

    } failure:^(NSError *error)
     {

    }];

}





@end
